package com.qf.fc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户日志表(UserLog)表实体类
 *
 * @author makejava
 * @since 2024-09-16 22:56:04
 */
@Data  //简化类自动生成Get和Set和toString
@TableName("t_user_log")  //标记对应的表名
@NoArgsConstructor
public class UserLog extends Model<UserLog> {
    //序号，主键
    @TableId(type = IdType.AUTO)  //主键设置自增方式
    private Integer id;
    //用户id
    private Integer uid;
    //操作类型，注册，登录，密码找回，密码修改
    private String type;
    //内容
    private String content;
    //创建时间
    private Date createTime;

    public UserLog(Integer uid, String type, String content) {
        this.uid = uid;
        this.type = type;
        this.content = content;
        this.createTime = new Date();
    }
}

